{#
 This Source Code Form is subject to the terms of the Mozilla Public
 License, v. 2.0. If a copy of the MPL was not distributed with this
 file, You can obtain one at https://mozilla.org/MPL/2.0/.
#}

  {% extends "base-article.html" %}

  {% block page_title %}Speaker Request Form{% endblock %}

  {% block page_css %}
  {{ css_bundle('protocol-emphasis-box') }}
  {{ css_bundle('press') }}
  {% endblock %}

  {% block side_nav %}
    {% include 'press/includes/resources.html' %}
  {% endblock %}

  {% block article %}
  <header>
    <h1 class="mzp-c-article-title">Speaker request form</h1>
  </header>

  {% if not form_success %}
  <h2>
    Please complete and submit the form below to request a speaker from Mozilla for your upcoming event.
  </h2>

  {% endif %}
  {% if not form_success %}
  <section class="mzp-c-emphasis-box">
    {% with url='https://bugzilla.mozilla.org/form.dev-engagement-event' %}
    If you are hosting a developer conference or event and want someone from
    Mozilla's developer team to speak, please fill out the
    <a href="{{ url }}">Developer Events Request Form</a> instead.
    {% endwith %}
  </section>

  {% if form.errors %}
  <aside class="mzp-c-notification-bar mzp-t-error">
    <p>
      <strong>An error has occurred with your submission. Please review your information and try again.</strong>
    </p>
  </aside>
  {% endif %}

  <form action="{{ url('press.speaker-request') }}" method="post" class="mzp-c-form"
    name="speaker-request-form" id="speaker-request-form" enctype="multipart/form-data">
    {{ csrf() }}

    <fieldset class="mzp-c-field-set">
      <div class="mzp-c-field {% if form.sr_event_name.errors %}mzp-is-error{% endif %}">
        <label class="mzp-c-field-label" for="sr_event_name">Event Name</label>
        {{ field_with_attrs(form.sr_event_name, class='mzp-c-field-control'|safe) }}
        <div class="mzp-c-field-info">{{ form.sr_event_name.errors }}</div>
      </div>

      <div class="mzp-c-field {% if form.sr_event_url.errors %}mzp-is-error{% endif %}">
        <label class="mzp-c-field-label" for="sr_event_url">Event URL</label>
        {{ field_with_attrs(form.sr_event_url, class='mzp-c-field-control'|safe) }}
        <div class="mzp-c-field-info">{{ form.sr_event_url.errors }}</div>
      </div>

      <div class="mzp-c-field {% if form.sr_event_date.errors %}mzp-is-error{% endif %}">
        <label class="mzp-c-field-label"  for="sr_event_date">Date</label>
        {{ field_with_attrs(form.sr_event_date, class='mzp-c-field-control'|safe) }}
        <p class="mzp-c-field-info date-note">2015-03-14 or March 14, 2015</p>
        <div class="mzp-c-field-info">{{ form.sr_event_date.errors }}</div>
      </div>

      <div class="mzp-c-field {% if form.sr_event_time.errors %}mzp-is-error{% endif %}">
        <label class="mzp-c-field-label"  for="sr_event_time">Time</label>
        {{ field_with_attrs(form.sr_event_time, class='mzp-c-field-control'|safe) }}
        <p class="mzp-c-field-info time-note">2:30 PM or 14:30</p>
        <div class="mzp-c-field-info">{{ form.sr_event_time.errors }}</div>
      </div>

      <div class="mzp-c-field {% if form.sr_guest_speaker1.errors %}mzp-is-error{% endif %}">
        <label class="mzp-c-field-label" for="sr_guest_speaker1">Guest Speaker Choice #1</label>
        {{ field_with_attrs(form.sr_guest_speaker1, class='mzp-c-field-control'|safe) }}
        <div class="mzp-c-field-info">{{ form.sr_guest_speaker1.errors }}</div>
      </div>

      <div class="mzp-c-field {% if form.sr_guest_speaker2.errors %}mzp-is-error{% endif %}">
        <label class="mzp-c-field-label" for="sr_guest_speaker2">Guest Speaker Choice #2</label>
        {{ field_with_attrs(form.sr_guest_speaker2, class='mzp-c-field-control'|safe) }}
        <div class="mzp-c-field-info">{{ form.sr_guest_speaker2.errors }}</div>
      </div>
    </fieldset>

    <fieldset class="mzp-c-field-set">
      <legend class="mzp-c-form-subtitle">Contact Information</legend>
      <div class="mzp-c-field {% if form.sr_contact_name.errors %}mzp-is-error{% endif %}">
        <label class="mzp-c-field-label" for="sr_contact_name">Name</label>
        {{ field_with_attrs(form.sr_contact_name, class='mzp-c-field-control'|safe) }}
        <div class="mzp-c-field-info">{{ form.sr_contact_name.errors }}</div>
      </div>

      <div class="mzp-c-field {% if form.sr_contact_title.errors %}mzp-is-error{% endif %}">
        <label class="mzp-c-field-label" for="sr_contact_title">Title</label>
        {{ field_with_attrs(form.sr_contact_title, class='mzp-c-field-control'|safe) }}
        <div class="mzp-c-field-info">{{ form.sr_contact_title.errors }}</div>
      </div>

      <div class="mzp-c-field {% if form.sr_contact_company.errors %}mzp-is-error{% endif %}">
        <label class="mzp-c-field-label" for="sr_contact_company">Company</label>
        {{ field_with_attrs(form.sr_contact_company, class='mzp-c-field-control'|safe) }}
        <div class="mzp-c-field-info">{{ form.sr_contact_company.errors }}</div>
      </div>

      <div class="mzp-c-field {% if form.sr_contact_phone.errors %}mzp-is-error{% endif %}">
        <label class="mzp-c-field-label" for="sr_contact_phone">Phone</label>
        {{ field_with_attrs(form.sr_contact_phone, class='mzp-c-field-control'|safe) }}
        <div class="mzp-c-field-info">{{ form.sr_contact_phone.errors }}</div>
      </div>

        {{ field_with_attrs(form.office_fax, class='mzp-c-field-control'|safe) }}

      <div class="mzp-c-field {% if form.sr_contact_email.errors %}mzp-is-error{% endif %}">
        <label class="mzp-c-field-label" for="sr_contact_email">Email</label>
        {{ field_with_attrs(form.sr_contact_email, class='mzp-c-field-control'|safe) }}
        <div class="mzp-c-field-info">{{ form.sr_contact_email.errors }}</div>
      </div>

      <div class="mzp-c-field {% if form.sr_contact_company_url.errors %}mzp-is-error{% endif %}">
        <label class="mzp-c-field-label" for="sr_contact_company_url">Company URL</label>
        {{ field_with_attrs(form.sr_contact_company_url, class='mzp-c-field-control'|safe) }}
        <div class="mzp-c-field-info">{{ form.sr_contact_company_url.errors }}</div>
      </div>
    </fieldset>

    <fieldset class="mzp-c-field-set">
      <legend class="mzp-c-form-subtitle">Event Details</legend>

      <div class="mzp-c-field {% if form.sr_event_venue.errors %}mzp-is-error{% endif %}">
        <label class="mzp-c-field-label" for="sr_event_venue">Venue</label>
        {{ field_with_attrs(form.sr_event_venue, class='mzp-c-field-control'|safe) }}
        <div class="mzp-c-field-info">{{ form.sr_event_venue.errors }}</div>
      </div>

      <div class="mzp-c-field {% if form.sr_event_theme.errors %}mzp-is-error{% endif %}">
        <label class="mzp-c-field-label" for="sr_event_theme">Theme</label>
        {{ field_with_attrs(form.sr_event_theme, class='mzp-c-field-control'|safe) }}
        <div class="mzp-c-field-info">{{ form.sr_event_theme.errors }}</div>
      </div>

      <div class="mzp-c-field {% if form.sr_event_goal.errors %}mzp-is-error{% endif %}">
        <label class="mzp-c-field-label" for="sr_event_goal">Goal</label>
        {{ field_with_attrs(form.sr_event_goal, class='mzp-c-field-control'|safe) }}
        <div class="mzp-c-field-info">{{ form.sr_event_goal.errors }}</div>
      </div>

      <div class="mzp-c-field {% if form.sr_event_format.errors %}mzp-is-error{% endif %}">
        <label class="mzp-c-field-label" for="sr_event_format">Format</label>
        {{ field_with_attrs(form.sr_event_format, class='mzp-c-field-control'|safe) }}
        <div class="mzp-c-field-info">{{ form.sr_event_format.errors }}</div>
      </div>

      <div class="mzp-c-field {% if form.sr_event_audience_size.errors %}mzp-is-error{% endif %}">
        <label class="mzp-c-field-label" for="sr_event_audience_size">Expected Audience Size</label>
        {{ field_with_attrs(form.sr_event_audience_size, class='mzp-c-field-control'|safe) }}
        <div class="mzp-c-field-info">{{ form.sr_event_audience_size.errors }}</div>
      </div>

      <div class="mzp-c-field {% if form.sr_event_audience_demographics.errors %}mzp-is-error{% endif %}">
        <label class="mzp-c-field-label" for="sr_event_audience_demographics">Audience Demographics</label>
        {{ field_with_attrs(form.sr_event_audience_demographics, class='mzp-c-field-control'|safe) }}
        <div class="mzp-c-field-info">{{ form.sr_event_audience_demographics.errors }}</div>
      </div>

      <div class="mzp-c-field {% if form.sr_event_speakers_confirmed.errors %}mzp-is-error{% endif %}">
        <label class="mzp-c-field-label" for="sr_event_speakers_confirmed">Confirmed Speakers</label>
        {{ field_with_attrs(form.sr_event_speakers_confirmed, class='mzp-c-field-control'|safe) }}
        <div class="mzp-c-field-info">{{ form.sr_event_speakers_confirmed.errors }}</div>
      </div>

      <div class="mzp-c-field {% if form.sr_event_speakers_invited.errors %}mzp-is-error{% endif %}">
        <label class="mzp-c-field-label" for="sr_event_speakers_invited">Invited Speakers</label>
        {{ field_with_attrs(form.sr_event_speakers_invited, class='mzp-c-field-control'|safe) }}
        <div class="mzp-c-field-info">{{ form.sr_event_speakers_invited.errors }}</div>
      </div>

      <div class="mzp-c-field {% if form.sr_event_speakers_past.errors %}mzp-is-error{% endif %}">
        <label class="mzp-c-field-label" for="sr_event_speakers_past">Past Speakers</label>
        {{ field_with_attrs(form.sr_event_speakers_past, class='mzp-c-field-control'|safe) }}
        <div class="mzp-c-field-info">{{ form.sr_event_speakers_past.errors }}</div>
      </div>

      <div class="mzp-c-field {% if form.sr_event_media_coverage.errors %}mzp-is-error{% endif %}">
        <label class="mzp-c-field-label" for="sr_event_media_coverage">Media Coverage</label>
        {{ field_with_attrs(form.sr_event_media_coverage, class='mzp-c-field-control'|safe) }}
        <div class="mzp-c-field-info">{{ form.sr_event_media_coverage.errors }}</div>
      </div>

      <div class="mzp-c-field {% if form.sr_event_sponsors.errors %}mzp-is-error{% endif %}">
        <label class="mzp-c-field-label" for="sr_event_sponsors">Event Sponsors</label>
        {{ field_with_attrs(form.sr_event_sponsors, class='mzp-c-field-control'|safe) }}
        <div class="mzp-c-field-info">{{ form.sr_event_sponsors.errors }}</div>
      </div>

      <div class="mzp-c-field {% if form.sr_event_confirmation_deadline.errors %}mzp-is-error{% endif %}">
        <label class="mzp-c-field-label" for="sr_event_confirmation_deadline">Confirmation Deadline</label>
        {{ field_with_attrs(form.sr_event_confirmation_deadline, class='mzp-c-field-control'|safe) }}
        <p class="mzp-c-field-info">2015-03-14 or March 14, 2015</p>
        <div class="mzp-c-field-info">{{ form.sr_event_confirmation_deadline.errors }}</div>
      </div>
    </fieldset>

    <fieldset class="mzp-c-field-set">
      <legend class="mzp-c-form-subtitle">Presentation Details</legend>

      <div>
        <label class="mzp-c-field-label" for="sr_presentation_type">Type of Presentation</label>
        {{ form.sr_presentation_type }}
      </div>

      <div class="mzp-c-field {% if form.sr_presentation_topic.errors %}mzp-is-error{% endif %}">
        <label class="mzp-c-field-label" for="sr_presentation_topic">Topic of Presentation</label>
        {{ field_with_attrs(form.sr_presentation_topic, class='mzp-c-field-control'|safe) }}
        <div class="mzp-c-field-info">{{ form.sr_presentation_topic.errors }}</div>
      </div>

      <div class="mzp-c-field {% if form.sr_presentation_length.errors %}mzp-is-error{% endif %}">
        <label class="mzp-c-field-label" for="sr_presentation_length">Expected Length</label>
        {{ field_with_attrs(form.sr_presentation_length, class='mzp-c-field-control'|safe) }}
        <p class="mzp-c-field-info">(in hours, e.g. 2.5)</p>
        <div class="mzp-c-field-info">{{ form.sr_presentation_length.errors }}</div>
      </div>
    </fieldset>

    <fieldset class="mzp-c-field-set">
      <legend class="mzp-c-form-subtitle">Additional Information</legend>

      <div class="mzp-c-field {% if form.sr_attachment.errors %}mzp-is-error{% endif %}">
        <label class="mzp-c-field-label" for="sr_attachment">PDF Attachment</label>
        {{ field_with_attrs(form.sr_attachment, class='mzp-c-field-control'|safe) }}
        <div class="mzp-c-field-info">
          <em>Agenda, media list, etc.</em>
          <p>Maximum file size is 5 MB.</p>
        </div>
        <div class="mzp-c-field-info">{{ form.sr_attachment.errors }}</div>
      </div>
    </fieldset>
    <div class="mzp-c-button-container">
      <button type="submit" name="submit_form" class="mzp-c-button mzp-t-primary">Submit</button>
    </div>
  </form>

  {% else %}
  <aside class="mzp-c-notification-bar mzp-t-success">
    <p>
      <strong>Your request has been sent.</strong>
      Thank you for your interest.
    </p>
  </aside>
  {% endif %}

  {% endblock %}

  {% block email_form %}{% endblock %}

  {% block js %}
  {% endblock  %}
